    const Allarray=[
      {
        "id": "0",
        "createTime": "2023-05-11 12:17:29",
        "createUser": "0",
        "updateTime": "2023-05-12 15:00:02",
        "updateUser": "0",
        "code": "CYS000001",
        "name": "品达物流",
        "personName": "张三",
        "phone": "12010981002",
        "email": "123456@itcast.com",
        "location": "北京市西城区",
        "province": "1",
        "city": "3",
        "area": "2",
        "address": "金融街13号",
        "status": 0,
        "remark": "",
        "createName": "刘世娟",
        "updateName": "刘世娟",
        "logicDel": 1
    },{
      "id": "1",
      "createTime": "2023-05-11 12:17:29",
      "createUser": "0",
      "updateTime": "2023-05-12 15:00:02",
      "updateUser": "0",
      "code": "CYS000002",
      "name": "不顺风快递",
      "personName": "李四",
      "phone": "12010981002",
      "email": "98443@itcast.com",
      "location": "北京市西城区",
      "province": "1",
      "city": "3",
      "area": "2",
      "address": "金融街13号",
      "status": 0,
      "remark": "",
      "createName": "刘世娟",
      "updateName": "刘世娟",
      "logicDel": 1
  }
    ]


module.exports = [
{
  url:'/carrier/page',
  type:'get',
  response: config => {

  let array
  if('like_code'in config.query){
   array=Allarray.filter(v=>{
    const code =config.query.like_code===''||v.code=== config.query.like_code
   const name=config.query.like_name===''||v.name===config.query.like_name
   const personName=config.query.like_personName===''||v.person===config.query.like_personName
   return code&&
   name&&
   personName
  })
  }else{
    array=Allarray
  }
    const num=+config.query.current*(+config.query.size)
    let arr=array.slice(num-(+config.query.size),num)
    return {
      "code": 0,
      "data": {
          "records": arr,
          "total": Allarray.length,
          "size": config.query.size,
          "current": config.query.current,
          "pages": config.query.current
      },
      "msg": "ok",
      "timestamp": Date.now(),
      "isSuccess": true,
      "isError": false
  }
  }
}

]
